package com.andyage.admin.action;

import javax.annotation.Resource;
import javax.servlet.http.HttpServletResponse;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;

import com.andyage.admin.bean.RoleStaffBean;
import com.andyage.admin.service.IRoleStaffService;

@Controller
@RequestMapping("/admin")
public class RoleStaffAction {
	@Resource
	private IRoleStaffService iroleStaffService;
	public  String CONTENT_TYPE="text/html;charset=utf-8";
	@RequestMapping("/insertRoletoStaff")
	public void insertRoletoStaff(HttpServletResponse response,RoleStaffBean roleStaffBean) throws Exception {
		String json=iroleStaffService.insertRoletoStaff(roleStaffBean);
		response.setContentType(CONTENT_TYPE);
		response.getWriter().print(json);
	}
	@RequestMapping("/queryRoleStaff")
	public void queryRoleStaff(HttpServletResponse response,RoleStaffBean roleStaffBean) throws Exception {
		iroleStaffService.queryRoleStaff(roleStaffBean);
	}
	@RequestMapping("/updateRoleStaff")
	public void updateRoleStaff(HttpServletResponse response,RoleStaffBean roleStaffBean) throws Exception {
		String json=iroleStaffService.updateRoleStaff(roleStaffBean);
		response.setContentType(CONTENT_TYPE);
		response.getWriter().print(json);
	}
}
